<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>color - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="color.html">color</a><ul class='methods'><li data-type='method'><a href="color.html#.setColorOpacity">setColorOpacity</a></li></ul></li><li><a href="data.html">data</a><ul class='methods'><li data-type='method'><a href="data.html#.getMax">getMax</a></li><li data-type='method'><a href="data.html#.getMin">getMin</a></li><li data-type='method'><a href="data.html#.getTotal">getTotal</a></li><li data-type='method'><a href="data.html#.toArray">toArray</a></li><li data-type='method'><a href="data.html#.toJson">toJson</a></li></ul></li><li><a href="date.html">date</a><ul class='methods'><li data-type='method'><a href="date.html#.dateFormat">dateFormat</a></li><li data-type='method'><a href="date.html#.getDate">getDate</a></li></ul></li><li><a href="is.html">is</a><ul class='methods'><li data-type='method'><a href="is.html#.isIDCard">isIDCard</a></li><li data-type='method'><a href="is.html#.isPhone">isPhone</a></li><li data-type='method'><a href="is.html#.isType">isType</a></li></ul></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">color</h1>
    

    




<section>

<header>
    
        <h2>
        color
        </h2>
        
    
</header>

<article>
    
        <div class="container-overview">
        
            

<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="namespace_namespace.js.html">namespace/namespace.js</a>, <a href="namespace_namespace.js.html#line15">line 15</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>




            

            
        
        </div>
    

    

    

    
    
    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".setColorOpacity"><span class="type-signature">(static) </span>setColorOpacity<span class="signature">(color, opacity)</span><span class="type-signature"></span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="color_transform.js.html">color/transform.js</a>, <a href="color_transform.js.html#line17">line 17</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    设置色值透明度：输入色值和透明度，返回符合透明度的新色值
</div>









    <h5>Example</h5>
    
    <pre class="prettyprint"><code>setColorOpacity('#fff',0.5); // rgba(255,255,255,0.5)</code></pre>




    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>color</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">色值(必传)<br />支持格式：hex,rgb,rgba</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opacity</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">透明度(可选) <br />范围:0 - 1</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    rgba 格式色值
</div>



    



        
    

    

    
</article>

</section>




    
    
</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Feb 24 2021 16:40:34 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>



</body>
</html>